package com.ruoyi.manage.organization.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.ListUtil;
import com.ruoyi.manage.organization.domain.BizOrganizationDict;
import com.ruoyi.manage.organization.mapper.BizOrganizationDictMapper;
import com.ruoyi.manage.organization.service.IBizOrganizationDictService;
import org.springframework.stereotype.Service;


/**
 * 金融机构编码信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-08
 */
@Service
public class BizOrganizationDictServiceImpl extends ServiceImpl<BizOrganizationDictMapper, BizOrganizationDict> implements IBizOrganizationDictService{


    @Override
    public BizOrganizationDict queryGetById(String orgName){
        BizOrganizationDict bizOrganizationDict = this.getById(orgName);
        return bizOrganizationDict;
    }

    /**
     * 新增金融机构编码信息
     *
     * @param bizOrganizationDict 金融机构编码信息
     * @return 结果
     */
    @Override
    public boolean addBizOrganizationDict(BizOrganizationDict bizOrganizationDict){
        boolean save =this.save(bizOrganizationDict);
        return save;
    }

    /**
     * 修改金融机构编码信息
     *
     * @param bizOrganizationDict 金融机构编码信息
     * @return 结果
     */
    @Override
    public boolean updateBizOrganizationDict(BizOrganizationDict bizOrganizationDict){
        return this.updateById(bizOrganizationDict);
    }

    /**
     * 批量删除金融机构编码信息
     *
     * @param orgNames 需要删除的金融机构编码信息主键
     * @return 结果
     */
    @Override
    public boolean deleteBizOrganizationDictByOrgNames(String[] orgNames){
        return this.removeByIds(ListUtil.toList(orgNames));
    }

}
